package com.frejoys.store.controller;

import com.frejoys.common.aop.Authority;
import com.frejoys.common.aop.Authorization;
import com.frejoys.common.aop.VerifyStore;
import com.frejoys.common.constant.CommonConstant;
import com.frejoys.common.response.Result;
import com.frejoys.common.vo.common.SelectVo;
import com.frejoys.service.ActivityService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Tag(name = "平台活动接口")
@RestController
@RequiredArgsConstructor
@RequestMapping(CommonConstant.routePrefixStore)
@Authorization(Authority.Private)
public class MallActivityController {


    private final ActivityService activityService;

    @VerifyStore
    @Operation(summary = "查询平台开启的活动类型")
    @PostMapping("/activity/list")
    public Result<List<SelectVo>> activityList() {
        return Result.success(activityService.getSelectList());
    }



}
